package com.stox.manager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.stox.model.ExchangeDownloadMetaData;
import com.stox.repository.ExchangeDownloadMetaDataRepository;

@Component
@Transactional
public class ExchangeDownloadMetaDataManagerImpl implements
		ExchangeDownloadMetaDataManager {

	@Autowired
	private ExchangeDownloadMetaDataRepository exchangeDownloadMetaDataRepository;

	@Override
	public ExchangeDownloadMetaData findByExchangeId(Long exchangeId) {
		return exchangeDownloadMetaDataRepository.findByExchangeId(exchangeId);
	}

	@Override
	@Transactional
	public ExchangeDownloadMetaData save(
			ExchangeDownloadMetaData exchangeDownloadMetaData) {
		return exchangeDownloadMetaDataRepository.save(exchangeDownloadMetaData);
	}
	
}
